﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Threading.Tasks;
using TabbedTemplate.Models;
using TabbedTemplate.ViewModels;
using Xamarin.Forms;

namespace TabbedTemplate.Services
{
    public interface IPunchInfoStorage
    {
        /// <summary>
        /// 是否已经初始化。判断版本
        /// </summary>
        bool PunchInfoStorageInitialized();

        /// <summary>
        /// 初始化，copy新版本数据库
        /// </summary>
        Task PunchInfoStorageInitializeAsync();
        /// <summary>
        /// 插入一条打卡记录。
        /// </summary>
        /// <param name="punchInfo"></param>
        /// <returns></returns>
        Task<long> InsertPunchInfoAsync(string storeUid,string content);

        Task InsertAllPunchInfoAsync(IList<PunchInfo> punchInfoList);
        /// <summary>
        /// 保存打卡。
        /// </summary>
        /// <param name="favorite">待保存的收藏。</param>
        /// <param name="generateTimestamp">是否生成时间戳。</param>
        Task SavePunchInfoAsync(PunchInfo punchInfo, bool generateTimestamp);
        /// <summary>
        /// 根据主键删除一条记录。
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task DeletePunchInfoByIdAsync(PunchInfo punchInfo);
        Task DeleteTableAsync();

        /// <summary>
        /// 根据Id主键获取一条打卡记录。
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<PunchInfo> GetPunchInfoById(int Id);
        /// <summary>
        /// 根据店铺Id获取全部打卡。
        /// </summary>
        /// <param name="storeUid"></param>
        /// <returns></returns>
        Task<IList<PunchInfo>> GetAllPunchInfoByStoreUid(string storeUid);
        /// <summary>
        /// 获得全部打卡记录。
        /// </summary>
        /// <returns></returns>
        Task<IList<PunchInfo>> GetAllPunchInfosAsync();

        Task<IList<PunchInfo>> GetAllPunchInfosAsync(int skip, int take);
    }
}
